/**
 * @file      mutex.h
 * @copyright Copyright (c) 2020, ZCW Co., Ltd. All Rights Reserved.
 * @brief     brief
 * @author    caiwang213@qq.com
 * @date      2020-05-18 15:43:23
 *
 * @note
 *  mutex.h defines
 */

#ifndef __MUTEX_H__
#define __MUTEX_H__
#include "ithread.h"

#define CLASS_NO_COPY(className) \
	private: \
		className(const className&); \
		className &operator=(const className&);
#include "log4x.h"
namespace log4x
{

class Mutex
{
    CLASS_NO_COPY(Mutex)
    friend class       AutoLock;
    friend class       Condition;
public:
    Mutex();
    ~Mutex();

protected:
    void               lock();
    void               unlock();

private:
    MUTEX              _mtx;
};
}
#endif
